package com.petHis.project.system.records.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.petHis.project.system.record.domain.MedicationRecord;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.petHis.framework.aspectj.lang.annotation.Excel;
import com.petHis.framework.web.domain.BaseEntity;

/**
 * 诊疗记录对象 medical_records
 * 
 * @author petHis
 * @date 2025-02-16
 */
public class MedicalRecords extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 记录ID */
    private Long recordId;

    /** 预约ID */
    @Excel(name = "关联预约ID")
    private Long appointmentId;

    /** 关联宠物ID */
//    @Excel(name = "关联宠物ID")
//    private Long petId;

    /** 诊断结果 */
    @Excel(name = "诊断结果")
    private String diagnosis;

    /** 操作医生名 */
    @Excel(name = "操作医生名")
    private String createBy;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createTime;

    /**费用*/
    @Excel(name = "费用")
    private BigDecimal cost;



    @TableField(exist = false) // MyBatis-Plus 标记非数据库字段
    @Excel(name = "宠物名")
    private String petName; // 非数据库字段：宠物名


    @TableField(exist = false) // MyBatis-Plus 标记非数据库字段
    @Excel(name = "主人名")
    private String clientName; // 非数据库字段：客户名

    /** 状态（0待确认，1已确认，2已取消） */
    @TableField(exist = false) // MyBatis-Plus 标记非数据库字段
    @Excel(name = "状态", readConverterExp = "0=待确认，1已确认，2已取消")
    private String status;

    // 新增临时字段（不映射到数据库）
    @TableField(exist = false)
    private List<MedicationRecord> medications;

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public List<MedicationRecord> getMedications() {
        return medications;
    }

    public void setMedications(List<MedicationRecord> medications) {
        this.medications = medications;
    }

    public String getClientName() {
        return clientName;
    }

    public void setClientName(String clientName) {
        this.clientName = clientName;
    }

    public String getPetName() {
        return petName;
    }

    public void setPetName(String petName) {
        this.petName = petName;
    }

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public void setRecordId(Long recordId)
    {
        this.recordId = recordId;
    }

    public Long getRecordId() 
    {
        return recordId;
    }


    public Long getAppointmentId() {
        return appointmentId;
    }

    public void setAppointmentId(Long appointmentId) {
        this.appointmentId = appointmentId;
    }

    public void setDiagnosis(String diagnosis)
    {
        this.diagnosis = diagnosis;
    }

    public String getDiagnosis() 
    {
        return diagnosis;
    }

    @Override
    public String getCreateBy() {
        return createBy;
    }

    @Override
    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public BigDecimal getCost() {
        return cost;
    }

    public void setCost(BigDecimal cost) {
        this.cost = cost;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("recordId", getRecordId())
            .append("appointmentId", getAppointmentId())
            .append("diagnosis", getDiagnosis())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("cost", getCost())
            .append("petName", getPetName())
            .append("status", getStatus())
            .append("clientName", getClientName())
            .append("medications", getMedications())
            .toString();
    }
}
